package com.itheima.demo07.Function;

import java.util.function.Function;

public class Demo03Test {
    public static void main(String[] args) {
        String str = "赵丽颖,20";
        int num = change(str, s -> Integer.parseInt(s.split(",")[1]), i -> (i + 100) + "", s -> Integer.parseInt(s));
        System.out.println(num);
    }

    public static int change(String s, Function<String, Integer> fun1, Function<Integer, String> fun2, Function<String, Integer> fun3) {
        return fun1.andThen(fun2).andThen(fun3).apply(s);
    }
}
